 
  function addCart(){ 
    	 var offset = $('.end').offset(); 
        $('body').append('<div class="floatOrder"><img src="img/lizi.png" width="50" height="50" /></div');
          var thisItem = $('.floatOrder');  
          var flyer = thisItem.clone();  
          flyer.fly({  
              start: {  
                  left: event.pageX-35,  
                  top: event.pageY-40  
              },  
              end: {  
                left: offset.left + 30,  
                top: offset.top + 30,  
                width: 0,  
                height: 0  
              },
              onEnd: function() {
				// $("#floatOrder").show().animate({width: '150px'},300).fadeOut(500);////成功加入购物车动画效果
				     $('.floatOrder').remove(); //销毁抛物体
				}     
      }); 
    }

  function addCart2(){ 
    	 var offset = $('.end').offset(); 
        $('body').append('<div class="floatOrder"><img src="img/lizi.png" width="50" height="50" /></div');
          var thisItem = $('.floatOrder');  
          var flyer = thisItem.clone();  
          flyer.fly({  
              start: {  
                  left: event.pageX-35,  
                  top: event.pageY-40  
              },  
              end: {  
                left: offset.left + 100,  
                top: offset.top + 30,  
                width: 0,  
                height: 0
              },
             onEnd: function() {
				// $(".floatOrder").show().animate({width: '200px'},300).fadeOut(500);////成功加入购物车动画效果
				$('.floatOrder').remove(); //销毁抛物体
				   }     
        }); 
    }

  function bounce(){
	$('#bounce').animate({"top":"20px",},100).animate({"top":"0",},100)
		.animate({"top":"15px",},100).animate({"top":"-0px",},100)
		.animate({"top":"10px",},100).animate({"top":"0",},100);
  }
   function bounce2(){
	$('#bounce2').animate({"top":"20px",},100).animate({"top":"0",},100)
		.animate({"top":"15px",},100).animate({"top":"-0px",},100)
		.animate({"top":"10px",},100).animate({"top":"0",},100);
  }
  var brand_lis = $('.mall_select_list ul.brand_name li'); 

  function shopSelect() {

            var arr = [];
            let initIndex;
            let nextIndex;
      for(var i = 0; i < $('.mall_select_box').length; i++) {
          arr.push($('.mall_select_box>.mall_select_value')[i].innerText);

      }
       $('.mall_select_value').on('click',function(e) {
          e.stopPropagation();
          initIndex = arr.indexOf(e.target.innerText);
          if(initIndex === nextIndex) {
            $('.mall_select_list').eq(initIndex).toggle();
          }else{
            $('.mall_select_list').eq(initIndex).show();
            $('.mall_select_list').eq(nextIndex).hide();
             nextIndex = initIndex;
          }
      });
     

     
      for(var b = 0, len = brand_lis.length; b < len; b++){
        $('.mall_select_list ul.brand_name li').click(function(){
           $(this).addClass('mallActive').siblings().removeClass('mallActive').parents('.mall_select_list').hide();
         });
      } 
      var pinlei  = $('.mall_select_list ul.pinlei li')
      for(var b = 0, len = brand_lis.length; b < len; b++){
        $('.mall_select_list ul.pinlei li').click(function(){
           $(this).addClass('mallActive').siblings().removeClass('mallActive').parents('.mall_select_list').hide();
         });
      }  
      var fengge  = $('.mall_select_list ul.fengge li')
      for(var b = 0, len = brand_lis.length; b < len; b++){
        $('.mall_select_list ul.fengge li').click(function(){
           $(this).addClass('mallActive').siblings().removeClass('mallActive').parents('.mall_select_list').hide();
         });
      } 
       
      // 关闭下拉列表
      $(document).on('click touchstart',function(e) {
        var target = $(e.target);
           if(!target.is('.mall_select_value') && !target.is('.mall_select_list ul li')){
              if($('.mall_select_list').is(':visible')){
                $('.mall_select_list').hide();
              }
           }
      });
}
/*
    function touch() {
      $("body").on("touchstart", function(e) {
          // e.preventDefault();
          startX = e.originalEvent.changedTouches[0].pageX,
          startY = e.originalEvent.changedTouches[0].pageY;
      });
      $("body").on("touchmove", function(e) {
          // e.preventDefault();
          moveEndX = e.originalEvent.changedTouches[0].pageX,
          moveEndY = e.originalEvent.changedTouches[0].pageY,
          X = moveEndX - startX,
          Y = moveEndY - startY;
           
          if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
              // alert("left 2 right");
          }
          else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
              // alert("right 2 left");
          }
          else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
               $('#navbar2').hide();
               $('#navbar').attr('id','navbar');
              // alert("top 2 bottom");
          }
          else if ( Math.abs(Y) > Math.abs(X) && Y < 0 ) {
              // alert("bottom 2 top");
              // $('#navbar').remove();
              // $('#navbar2').show();
              // $('.mall_select_list').addClass('hidden');
          }
          else{
              // alert("just touch");
          }
      });

    }
*/
    function shopList(data) {
     _TR(data);
     var html = '';
     for(var k = 0, len = data.length; k < len; k++){
        var brand_word = data[k].brandName;
        var productId = data[k].id;
        var brandId = data[k].brandId;
        var goodsName = data[k].name;
        var price = data[k].price;  

        html += '<li class="goods boxshadow borderradius">'+
                      '<div class="goods_img">'+
                          '<a href="#p-commoditydetails?productId='+productId+'">'+
                              '<img class="img lazy lazy-fadein" src="img/lizi.png"/>'+                             
                          '</a>'+
                          '<div class="goodsword">'+
                            '<u class="item-title">'+"\u3010"+brand_word+"\u3011"+'</u>'+
                            '<u class="item-title">'+goodsName+'</u>'+
                          '</div>'+
                          '<div class="goodsword_foot">'+
                              '<div class="redword shopPrice">'+"￥"+price+'</div>'+
                              '<div class="graysmallword first_child">'+'￥1999'+'</div>'+
                              '<div class="graysmallword">'+'月售6笔'+'</div>'+
                              '<div class="addgoods">'+
                                  '<a href="#" tittle="加入购物车" class="baseBg Q-buy-btn" id="buy-s-1">'+'</a>'+
                              '</div>'+
                          '</div>'+
                      '</div>'+
                    '</li>';   
          }   
    $('#p-shop .goodslist_box').append(html); 
     var sales  = $('.mall_select_list ul.sales li');      

     $('.mall_select_list ul.sales li').click(function(){
     $(this).addClass('mallActive').siblings().removeClass('mallActive').parents('.mall_select_list').hide();
        if($(this).hasClass('top_foot')){
          $('.goods').remove();
         // var topPrice = shopPrice.sort(sortTop);   
         // console.log(topPrice) 
            // $('.shopPrice').val(topPrice);
          }
     });  

    }
// function sortPrice(shopPrice) {
//   
// }
